import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 信息类型信息 */
export interface InformationType {
          id: number; // 主键id
          informationType: string; // 信息类型
  }

// 信息类型 API
export const InformationTypeApi = {
  // 查询信息类型分页
  getInformationTypePage: async (params: any) => {
    return await request.get({ url: `/biz/information-type/page`, params })
  },

  // 查询信息类型详情
  getInformationType: async (id: number) => {
    return await request.get({ url: `/biz/information-type/get?id=` + id })
  },

  // 新增信息类型
  createInformationType: async (data: InformationType) => {
    return await request.post({ url: `/biz/information-type/create`, data })
  },

  // 修改信息类型
  updateInformationType: async (data: InformationType) => {
    return await request.put({ url: `/biz/information-type/update`, data })
  },

  // 删除信息类型
  deleteInformationType: async (id: number) => {
    return await request.delete({ url: `/biz/information-type/delete?id=` + id })
  },

  /** 批量删除信息类型 */
  deleteInformationTypeList: async (ids: number[]) => {
    return await request.delete({ url: `/biz/information-type/delete-list?ids=${ids.join(',')}` })
  },

  // 导出信息类型 Excel
  exportInformationType: async (params) => {
    return await request.download({ url: `/biz/information-type/export-excel`, params })
  },
}